<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>用户信息</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js" ></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common/validateData.js" ></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/page/weixin/register/register.js" ></script>
    
<style type="text/css">
@charset "utf-8";
/* CSS Document */
@charset "utf-8";
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {margin: 0;padding: 0}
body,button,input,select,textarea {font: 400 14px / 1.5 Arial,"Lucida Grande",Verdana,"Microsoft YaHei",hei}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,iframe{display: block}
h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:bold}
address,cite,dfn,em,var, i{font-style:normal;font-weight:400}
dfn {font-family:Arial}
ul,ol {list-style:none}
a {color:#000;text-decoration:none}
a: hover {-webkit-transition:color.2s linear;-moz-transition:color.2s linear; -ms-transition: color.2s linear;-o-transition:color.2s linear;transition: color.2s linear}
fieldset,img,button,input {border: 0}
button,input,select,textarea {font-size: 100 %}
table{border-collapse: collapse;border-spacing: 0}
input{ border-radius: 0}
input[type=radio]{width:20px;height:20px;}
input[type=text],input[type=password],input[type=number],input[type=url],input[type=email],input[type=tel] ,input[type=date],select{
	height: 35px;
	line-height: 35px;
	border: 1px #ccc solid;
	text-indent: 5px;
	font-size: 14px;
	border-top-color: #9c9c9d;
	color: #a0a0a0;
	-webkit-box-shadow: inset 0 1px 3px #aaa;
	-webkit-border-radius: 3px;
}
body {min-width:320px;background:#f5f5f5;overflow-x:hidden;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-font-smoothing:antialiased;-moz-user-select: none;
color: #000}
.clearfix {*zoom:1}
.clearfix:after{clear:both;content:"";display:block;height: 0;visibility: hidden;line-height: 0}

.fl {float:left}
.fr {float:right}
.clear {clear: both}
.overflow {overflow: hidden}



h1 {font: 600 1.286em/2 Arial,"Lucida Grande",Verdana,"Microsoft YaHei",hei}
h2 {font: 600 1.143em/2 Arial,"Lucida Grande",Verdana,"Microsoft YaHei",hei}
h3 {font: 600 1em/1.5 Arial,"Lucida Grande",Verdana,"Microsoft YaHei",hei}

ul li{margin:5px auto;overflow:hidden;}
ul li label{display:inline-block;width:60px;}
ul li input{width:100%}

select{width: 80%;}

.ui-btn{
cursor:pointer;
display:block;
margin:0.5em 0;
padding:0;
position:relative;
text-align:center;
}

.ui-btn:HOVER{
	color:#2f3e46;
	background:linear-gradient(#f6f6f6, #e0e0e0) repeat scroll 0 0 #dfdfdf;
	border:1px solid #bbb;
	font-weight:700;
	text-shadow:0 1px 0 #fff;
}

.ui-shadow{
box-shadow:0 1px 3px rgba(0, 0, 0, 0.2);
}

.ui-btn-corner-all{
background-clip:padding-box;
}

.ui-btn-inner{
	display:block;
	font-size:16px;
	min-width:0.75em;
	overflow:hidden;
	padding:0.6em 20px;
	position:relative;
	text-overflow:ellipsis;
	white-space:nowrap;
	border-top:1px solid rgba(255, 255, 255, 0.3);
}

.ui-btn-text{
	-moz-user-select:none;
	position:relative;
	width:100%;
	z-index:1;
}
</style>    
</head>
<body>
<div id="divViewUser" >
<ul class="clearfix" style="margin:10px;border:1px solid #ccc;padding:10px;">
	<li>
		<label>姓名</label>
		${userdetail.name }
	</li>
	<li>
		<label>出生日期</label>
		${userdetail.birthday }
	</li>
	<li>
		<label>手机</label>
		${userdetail.mobilePhone }
	</li>
	<li>
		<label>户籍</label>
		${userdetail.household }
	</li>
	<li>
		<label>户籍类型</label>
		<c:if test="${userdetail.householdType==1 }">
			城镇户口
		</c:if>
		<c:if test="${userdetail.householdType==2 }">
			农村户口
		</c:if>
	</li>
	<li>
		<label>婚否</label>
		<c:if test="${userdetail.marry==0 }">
			已婚
		</c:if>
		<c:if test="${userdetail.marry==1 }">
			未婚
		</c:if>
	</li>
	<li>
		<label>文化程度</label>
		<c:if test="${userdetail.education==1 }">
			小学
		</c:if>
		<c:if test="${userdetail.education==2 }">
			初中
		</c:if>
		<c:if test="${userdetail.education==3 }">
			高中
		</c:if>
		<c:if test="${userdetail.education==4 }">
			大专
		</c:if>
		<c:if test="${userdetail.education==5 }">
			本科
		</c:if>
		<c:if test="${userdetail.education==6 }">
			硕士
		</c:if>
		<c:if test="${userdetail.education==7 }">
			博士
		</c:if>
	</li>
	<li>
		<label>性别</label>
		<c:if test="${userdetail.sex==0 }">
		 	女
		</c:if>
		<c:if test="${userdetail.sex==1 }">
		 	男
		</c:if>
	</li>
</ul>
<div align="center" style="padding-top: 20px;padding-left: 10px;padding-right: 10px;">
		<a class="ui-btn ui-shadow ui-btn-corner-all" href="javascript:void(0)" onclick="toEditUser()" >
			<span class="ui-btn-inner">
				<span class="ui-btn-text">修改</span>
			</span>
		</a>
	</div>
</div>

<div id="divEditUser" style="display: none;">
<form id="frmEditUser" method="post" action="${pageContext.request.contextPath}/weixin/register/edit">
	<input type="hidden" id="openId" name="openId" value="${openId}">
	<input type="hidden" name="id" value="${userdetail.id }">
<ul class="clearfix" style="margin:10px;border:1px solid #ccc;padding:10px;">
	<li>
		<label>姓名</label>
		<input id='txtName' type='text' name="name"  required="required" maxlength="10" value="${userdetail.name }" >
	</li>
	<li>
		<label>出生日期</label>
		<input id="txtBirthday" type="date" name="birthday" value="${userdetail.birthday }"  >
	</li>
	<li>
		<label>手机</label>
		${userdetail.mobilePhone }
	</li>
	<li>
		<label>户籍</label>
		<select id="selHousehold"  name="household">
		
		</select>
		<input id="txtHousehold" type="hidden" value="${userdetail.household }">
	</li>
	<li>
		<label>户籍类型</label>
		<select id="selHouseholdType" name="householdType">
			<option value="1" 
			<c:if test="${userdetail.householdType==1 }">
			selected="selected"
			</c:if>
			>城镇户口</option>
			<option value="2"
			<c:if test="${userdetail.householdType==2 }">
			selected="selected"
			</c:if>
			>农村户口</option>
		</select>
	</li>
	<li>
		<label>婚否</label>
		<select id="selMarry" name="marry" class="sel">
		 	<option value="0" 
		 	<c:if test="${userdetail.marry==0 }">
			selected="selected"
			</c:if>
		 	>已婚</option>
		 	<option value="1"
		 	<c:if test="${userdetail.marry==1 }">
			selected="selected"
			</c:if>
		 	>未婚</option>
		 </select>
	</li>
	<li>
		<label>文化程度</label>
		<select id="selEducation" name="education" class="sel">
			<option value="1"
			<c:if test="${userdetail.education==1 }">
			selected="selected"
			</c:if>
			>小学</option>
			<option value="2"
			<c:if test="${userdetail.education==2 }">
			selected="selected"
			</c:if>
			>初中</option>
			<option value="3"
			<c:if test="${userdetail.education==3 }">
			selected="selected"
			</c:if>
			>高中</option>
			<option value="4"
			<c:if test="${userdetail.education==4 }">
			selected="selected"
			</c:if>
			>大专</option>
			<option value="5" 
			<c:if test="${userdetail.education==5 }">
			selected="selected"
			</c:if>
			>本科</option>
			<option value="6"
			<c:if test="${userdetail.education==6 }">
			selected="selected"
			</c:if>
			>硕士</option>
			<option value="7" 
			<c:if test="${userdetail.education==7 }">
			selected="selected"
			</c:if>
			>博士</option>
		</select>
	</li>
	<li>
		<label>性别</label>
		<select id="selSex" name="sex" class="sel">
		 	<option value="0" 
		 	<c:if test="${userdetail.sex==0 }">
		 	selected="selected"
		 	</c:if>
		 	>女</option>
		 	<option value="1"
		 	<c:if test="${userdetail.sex==1 }">
		 	selected="selected"
		 	</c:if>
		 	>男</option>
		 </select>
	</li>
</ul>
	<div align="center" style="padding-top: 20px;padding-left: 10px;padding-right: 10px;">
		<a class="ui-btn ui-shadow ui-btn-corner-all" href="javascript:void(0)" onclick="submitEditFrm()" >
			<span class="ui-btn-inner">
				<span class="ui-btn-text">提交</span>
			</span>
		</a>
	</div>
</form>
</div>
</body>
</html>